import React from "react";
import _ from 'lodash'
import { Empty } from "antd";
import TheLineChart from "@/components/TheLineChart";

const LineChart = ({ name, lineXData, lineYData }) => {
  return <React.Fragment>
    {
      !_.isEmpty(lineXData) && !_.isEmpty(lineYData) && <TheLineChart
        name={name}
        lineXData={lineXData}
        lineYData={lineYData}
      />
    }
    {
      _.isEmpty(lineXData) && _.isEmpty(lineYData) && <Empty />
    }
  </React.Fragment>
}
export default LineChart;